let {contractInstance, web3} = require('./03_instance')
let test = async() => {
    let accounts = await web3.eth.getAccounts()
    try {
        // 调用合约的get方法
        let v1 = await contractInstance.methods.getValue().call()
        console.log('v1 : ', v1)
        // 调用合约的set方法
        let res = contractInstance.methods.setValue("aaaaaaaaa").send({
            from: accounts[1],
            value: 100,
        })
        console.log('res : ', res)
    } catch (e) {
        console.log(e)
    }
}
test()
